//
//  BarCodeViewController.m
//  01 微博
//
//  Created by zhoup on 16/5/14.
//  Copyright © 2016年 zhoup. All rights reserved.
//

#import "BarCodeViewController.h"

@interface BarCodeViewController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *scanContraints;

@end

@implementation BarCodeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
//    self.navigationController.tabBarItem.image=[UIImage imageNamed:@""];
//    self.navigationController.tabBarItem.selectedImage = [UIImage imageNamed:@""];
    
    
    CADisplayLink *link = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)];
    
    [link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
}

-(void)update
{
    self.scanContraints.constant += 5;
    
    if (self.scanContraints.constant > 218) {
        self.scanContraints.constant = 0;
    }
    
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
